<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>uupaa.js - uu.css("input:checked") test</title>
<script type="text/javascript" src="http://uupaa-js-spinoff.googlecode.com/svn/trunk/uupaa-detect.js/uupaa-detect.mini.js"></script>
<script type="text/javascript" src="../../uupaa-selector.js"></script>
<script type="text/javascript" src="../../uupaa-selector+.js"></script>
  <style>
  div { color:red; }
  </style>
</head>
<body>
  <form>
    <input type="checkbox" name="newsletter" checked="checked" value="Hourly" />
    <input type="checkbox" name="newsletter" value="Daily" />
    <input type="checkbox" name="newsletter" value="Weekly" />
    <input type="checkbox" name="newsletter" checked="checked" value="Monthly" />
    <input type="checkbox" name="newsletter" value="Yearly" />
  </form>
  <div id="result"></div>
<script>
function boot() {
  uu.css('input[type=checkbox]').forEach(function(v) {
    v.onclick = function(evt) {
      var n = uu.css("input:checked").length;
      uu.id("result").innerHTML = (n + (n == 1 ? " is" : " are") + " checked!");
    }
  });
}
window.onload = boot;
</script>
<pre>
  uu.css('input[type=checkbox]').forEach(function(v) {
    v.onclick = function(evt) {
      var n = uu.css("input:checked").length;
      uu.id("result").innerHTML = (n + (n == 1 ? " is" : " are") + " checked!");
    }
  });
</pre>
</body>
</html>